*********************************************************************************
*** Appendix A3
*********************************************************************************

* Project: 	International threats and European defense
* Authors: 	Matthias Mader
* Date:		March 2023	

* Data: VW Project, Pane-European survey (W1)

*********************************************************************************

*** Setup

	clear
	set more off            						// Disable partitioned output
	set dp period									// Use comma instead of dot for decimals
	set linesize 80         						// Line size limit to make output more readable
	macro drop _all         						// clear all macros
	set scheme plotplainblind, permanent				// set graph scheme, e.g., cleanplots, plottig, plotplainblind, burd3, s1mono
	graph set window fontface "Times New Roman"		// set font in graphs | "Arial" | "Times New Roman"


*** Table A3.1
	*EFA: Force 1 dimension (only international threats)
	
	use DATA_clean, clear

	factor Q8_1 Q8_2 Q8_3 Q8_5 Q8_6 , factors(1)
	rotate, promax

	foreach num of numlist 1/25{
		factor Q8_1 Q8_2 Q8_3 Q8_5 Q8_6 if QCOUNTRY == `num', factors(1)
		rotate, promax
	}
 


*** Table A3.2
	*EFA Force 2 dimensions (all threat items)
	
	use DATA_clean, clear

	factor Q8_1 Q8_2 Q8_3 Q8_5 Q8_6 , factors(2)
	rotate, promax

	foreach num of numlist 1/25{
		factor Q8_1 Q8_2 Q8_3 Q8_5 Q8_6 if QCOUNTRY == `num', factors(2)
		rotate, promax
	}
 